VERSION 5.00
Begin VB.Form frmDisapprove 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Disapprove"
   ClientHeight    =   2595
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2595
   ScaleWidth      =   4680
   StartUpPosition =   2  'CenterScreen
   Begin VB.OptionButton Option2 
      Caption         =   "Money exchange/Bank && Cash transfer"
      Height          =   375
      Left            =   600
      TabIndex        =   6
      Top             =   1560
      Width           =   3375
   End
   Begin VB.OptionButton Option1 
      Caption         =   "Invoice/Receipt/Budget"
      Height          =   375
      Left            =   600
      TabIndex        =   5
      Top             =   1200
      Value           =   -1  'True
      Width           =   2415
   End
   Begin VB.CommandButton cmddisapprove 
      Caption         =   "Disapprove"
      Height          =   375
      Left            =   1800
      TabIndex        =   4
      Top             =   2040
      Width           =   1815
   End
   Begin VB.ComboBox Combo1 
      Height          =   315
      ItemData        =   "frmDisapprove.frx":0000
      Left            =   1800
      List            =   "frmDisapprove.frx":0013
      TabIndex        =   2
      Top             =   720
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1800
      TabIndex        =   0
      Top             =   240
      Width           =   1815
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      Caption         =   "Office"
      Height          =   255
      Left            =   720
      TabIndex        =   3
      Top             =   720
      Width           =   855
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "Invoice number"
      Height          =   255
      Left            =   360
      TabIndex        =   1
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "frmDisapprove"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
 

Private Sub cmddisapprove_Click()
Dim sql As String
If Trim(Text1.Text) = "" Or Trim(Combo1.Text) = "" Then
    MsgBox "Both Invoice number and office box must be filled in", vbInformation + vbOKOnly, "Disapprove message"
    Exit Sub
End If
Call KetNoi
If Option2.Value = True Then
    sql = "Update MoneyExchange set Approved='0' where mnumber like '%" & Trim(Text1.Text) & "%' and OFFICE like '" & Combo1.Text & "'"
ElseIf Option1.Value = True Then
    sql = "Update detail  set Approved='0' where inumber like '%" & Trim(Text1.Text) & "%' and OFFICE like '" & Combo1.Text & "'"
End If
adoConnection.Execute (sql)
MsgBox "disapproval is successful", vbInformation + vbOKOnly, "Disapprove message"
Call DisconnectDB
End Sub
